Distance-measuring apparatus

ABSTRACT

A distance-measuring apparatus is arranged to project light toward an object at a distance to be measured, receive reflected light from the object, and detect the distance to the measured object through arithmetic operation and integration. In the distance-measuring apparatus, an integrating capacitor discharge/charge to a maximum when a time necessary for a first integration is longer a minimum. In the detection of the distance to the object, when the time necessary for the first integration is longer than the minimum time, a first integration and a second integration by the integrating capacitor are carried out repeatedly.

This application is a division of application Ser. No. 09/487,799, filedJan. 20, 2000, and now U.S. Pat. No. 6,399,956.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a distance-measuring apparatus formeasuring the distance to an object and, more particularly, to an activedistance-measuring apparatus suitably used in cameras and otherequipment.

2. Related Background Art

The active distance-measuring apparatus used in the cameras etc. isarranged to project light from an infrared-emitting diode (hereinafterreferred to as “IRED”) toward the measured object, to receive reflectedlight of the projected light by a position sensing device (hereinafterreferred to as “PSD”), to process a signal from this PSD by a signalprocessing circuit and an arithmetic circuit to output distanceinformation, and to determine the distance to the measured object by aCPU. Since the distance measurement with only one projection of lightcan cause an error, it is desirable that a plurality of light projectionoperations be carried-out to gain a plurality of distance informationpieces and that the plurality of distance information pieces beintegrated in a fixed period by an integrating circuit to be averaged.The integral of distance information by the integrating circuit iscarried out by applying a reference voltage to an integrating capacitorto store charge therein and discharging the capacitor according to thedistance information from that state.

SUMMARY OF THE INVENTION

There is, however, a possibility that the distance-measuring apparatusdescribed above fails to carry out accurate distance measurement.Namely, in cases wherein the discharge time of the integrating capacitoris changed depending upon the distance measurement conditions etc.,discharge amounts vary depending upon the difference in the dischargetime. Therefore, the capacitance of the integrating capacitor can beutilized fully as long as the discharge amount is large. However, if thedischarge amount is small, the integral operation cannot be performed byfully utilizing the capacitance of the integrating capacitor, and themeasurement accuracy will not be always sufficient.

Therefore, the present invention has been accomplished in view of thispoint and an object of the present invention is to provide adistance-measuring apparatus that can measure the distance with improvedmeasurement accuracy.

A distance-measuring apparatus according to the present invention is adistance-measuring apparatus comprising: light projecting means forprojecting pulses of light toward a measured object; light receivingmeans for receiving reflected light of the light projected toward themeasured object, at a photoreceptive position on a position sensingdevice according to a distance to the measured object and outputting asignal according to the photoreceptive position; arithmetic means forcarrying out.an arithmetic operation based on the signal outputted fromthe light receiving means and outputting an output ratio signalaccording to the distance to the measured object; integrating meanscomprising an integrating capacitor, the integrating means carrying outa first integral in which the signal outputted from the arithmetic meansis integrated by discharging/charging the integrating capacitoraccording to the signal outputted from the arithmetic means andthereafter carrying out a second integral by charging/discharging theintegrating capacitor at a constant current, the integrating meanscomparing a voltage of the integrating capacitor with a referencevoltage during the second integral and outputting a comparison resultsignal according to a result of the comparison; and detecting means fordetecting the distance to the measured object, based on the signaloutputted from the integrating means; wherein the integrating means isarranged in such a manner that a capacitance of the integratingcapacitor is set so as to discharge/charge the integrating capacitor tothe maximum when a time necessary for the first integral is minimum, andwherein the integrating means repeatedly carries out the first integraland the second integral of the integrating capacitor when the timenecessary for the first integral is longer than the minimum time, indetection of the distance to the measured object.

Another distance-measuring apparatus according to the present inventionis a distance-measuring apparatus comprising: light projecting means forprojecting pulses of light toward a measured object; light receivingmeans for receiving reflected light of the light projected toward themeasured object, at a photoreceptive position on a position sensingdevice according to a distance to the measured object and outputting asignal according to the photoreceptive position; arithmetic means forcarrying out an arithmetic operation based on the signal outputted fromthe light receiving means and outputting an output ratio signalaccording to the distance to the measured object; integrating meanscomprising an integrating capacitor, the integrating means carrying outa first integral in which the signal outputted from the arithmetic meansis integrated by discharging or charging the integrating capacitoraccording to the signal outputted from the arithmetic means andthereafter carrying out a second integral by charging/discharging theintegrating capacitor at a constant current, the integrating meanscomparing a voltage of the integrating capacitor with a referencevoltage during the second integral and outputting a comparison resultsignal according to a result of the comparison; and detecting means fordetecting the distance to the measured object, based on the signaloutputted from the integrating means; wherein the integrating meanscomprises a plurality of integrating capacitors of differentcapacitances and wherein the integrating means carries out the firstintegral and the second integral while selecting one of the plurality ofintegrating capacitors so as to discharge/charge the integratingcapacitor to the maximum in detection of the distance to the measuredobject.

Still another distance-measuring apparatus according to the presentinvention is a distance-measuring apparatus comprising: light projectingmeans for projecting pulses of light toward a measured object; lightreceiving means for receiving reflected light of the light projectedtoward the measured object, at a photoreceptive position on a positionsensing device according to a distance to the measured object andoutputting a signal according to the photoreceptive position; arithmeticmeans for carrying out an arithmetic operation based on the signaloutputted from the light receiving means and outputting an output ratiosignal according to the distance to the measured object; integratingmeans comprising an integrating capacitor, the integrating meanscarrying out a first integral in which the signal outputted from thearithmetic means is integrated by discharging/charging the integratingcapacitor according to the signal outputted from the arithmetic meansand thereafter carrying out a second integral by charging or dischargingthe integrating capacitor at a constant current, the integrating meanscomparing a voltage of the integrating capacitor with a referencevoltage during the second integral and outputting a comparison resultsignal according to a result of the comparison; and detecting means fordetecting the distance to the measured object, based on the signaloutputted from the integrating means; wherein the integrating meanscomprises a plurality of current sources of different output currentvalues and wherein the integrating means carries out the first integralwhile selecting one of the current sources so as to discharge/charge theintegrating capacitor to the maximum in detection of the distance to themeasured object.

The present invention can maximize the utilization of the dischargeableor chargeable dynamic range of the integrating capacitor on the occasionof the first integral. Therefore, improvement can be made in thedistance measurement accuracy.

The present invention will become more fully understood from thedetailed description given hereinbelow and the accompanying drawingswhich are given by way of illustration only, and thus are not to beconsidered as limiting the present invention.

Further scope of applicability of the present invention will becomeapparent from the detailed description given hereinafter. However, itshould be understood that the detailed description and specificexamples, while indicating preferred embodiments of the invention, aregiven by way of illustration only, since various changes andmodifications within the spirit and scope of the invention will becomeapparent to those skilled in the art from this detailed description.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a structural diagram of the first embodiment of thedistance-measuring apparatus according to the present invention;

FIG. 2 is a circuit diagram of a first signal processing circuit and anintegrating circuit in the distance-measuring apparatus of the firstembodiment;

FIG. 3 is a circuit diagram for explaining the voltage that can beutilized for discharge of the integrating capacitor;

FIG. 4A to FIG. 4C are explanatory diagrams to illustrate the operationof the distance-measuring apparatus of the first embodiment;

FIG. 5A to FIG. 5C are explanatory diagrams to illustrate the operationof the distance-measuring apparatus of the first embodiment;

FIG. 5D is an explanatory diagram to illustrate the operation of amodification of the distance-measuring apparatus of the firstembodiment;

FIG. 6 is a structural diagram of the second embodiment of thedistance-measuring apparatus according to the present invention; and

FIG. 7 is a structural diagram of the third embodiment of thedistance-measuring apparatus according to the present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

The preferred embodiments of the present invention will be described indetail with reference to the accompanying drawings. The followingdescription is based on the examples in which the activedistance-measuring apparatus of the embodiments is applied to thedistance-measuring apparatus of an autofocusing camera.

First Embodiment

FIG. 1 is a structural diagram of the distance-measuring apparatus 100of the present embodiment. CPU 1 controls the whole of the cameraequipped with this distance-measuring apparatus 100 and controls thewhole camera including this distance-measuring apparatus 100, based onprograms and parameters preliminarily stored in EEPROM 2. In thisdistance-measuring apparatus 100, the CPU 1 controls a driver 3 tocontrol emission of infrared light from IRED (infrared-emitting diode)4. The CPU 1 also controls the operation of autofocusing IC (hereinafterreferred to as “AFIC”) 10 and receives an AF signal outputted from theAFIC 10.

The infrared light emitted from the IRED 4 is projected through aprojection lens (not illustrated) placed in front of the IRED 4, towardan object to be measured. The infrared light is reflected in part by themeasured object and the reflected light is received somewhere on aphotoreceptive surface of PSD 5 through a reception lens (notillustrated) placed in front of the PSD (position sensing device) 5. Thelight receiving position varies depending upon the distance to themeasured object.

The PSD 5 outputs two signals I₁ and I₂ according to the receptionposition. The signal I₁ is a near-side signal which becomes greater withdecrease of the distance to the measured object if optical energy ofreceived light is constant. The signal I₂ is a far-side signal whichbecomes greater with increase of the distance to the measured object ifoptical energy of received light is constant. The sum of the signals I₁and I₂ represents optical energy of the reflected light received by thePSD 5. The near-side signal I₁ is sent to a PSDN terminal 31 of the AFIC10 and the far-side signal I₂ to a PSDF terminal 32 of the AFIC 10. Inpractice, however, the AFIC 10 accepts signals in which a stationarylight component I₀ is added to each of the near-side signal I₁ and thefar-side signal I₂, depending upon external field conditions.

The AFIC 10 is an integrated circuit (IC) which is composed of a firstsignal processing circuit 11, a second signal processing circuit 12, anarithmetic circuit 14, and an integrating circuit 15. The first signalprocessing circuit 11 receives the signal I₁+I₀ outputted from the PSD 5and removes the stationary light component I₀ from the signal to outputthe near-side signal I₁. The second signal processing circuit 12receives the signal I₂+I₀ outputted from the PSD 5 and removes thestationary light component I₀ from the signal to output the far-sidesignal I₂.

The arithmetic circuit 14 receives the near-side signal I₁ outputtedfrom the first signal processing circuit 11 and the far-side signal I₂outputted from the second signal processing circuit 12 and computes anoutput ratio (I₁/(I₁+I₂)) to output an output ratio signal indicatingthe result of the computation. This output ratio (I₁/(I₁+I₂)) indicatesthe reception position on the photoreceptive surface of PSD 5, i.e., thedistance to the measured object.

The integrating circuit 15 receives this output ratio signal and adds upa lot of output ratios in cooperation with an integrating capacitor 6connected to a C_(INT) terminal 33 of the AFIC 10, to improve an S/Nratio. The integral result of output ratios is outputted as an AF signalfrom an S_(OUT) terminal 34 of the AFIC 10. The CPU 1 receives the AFsignal outputted from the AFIC 10 and converts the AF signal to adistance signal by a predetermined arithmetic to send the distancesignal to a lens driving circuit 7. The lens driving circuit 7 moves ataking lens 8 to an in-focus position, based on the distance signal.

Circuit configurations of the first signal processing circuit 11 andintegrating circuit 15 of the AFIC 10 will be described in detail below.

FIG. 2 is a circuit diagram of the first signal processing circuit 11and the integrating circuit 15. The circuit configuration of the secondsignal processing circuit 12 is also similar to that of the first signalprocessing circuit 11. As described above, the first signal processingcircuit 11 is the circuit which receives the near-side signal I₁ plusthe stationary light component I₀ outputted from the PSD 5 and removesthe stationary light component I₀ therefrom to output the near-sidesignal I₁. Namely, a near-side terminal of the PSD 5 is connected viathe PSDN terminal 31 of the AFIC 10 to a negative input terminal of anoperational amplifier 20 of the first signal processing circuit 11.

An output terminal of the operational amplifier 20 is connected to abase terminal of transistor 21 and a collector terminal of thetransistor 21 is connected to a base terminal of transistor 22. Acollector terminal of the transistor 22 is connected to a negative inputterminal of operational amplifier 23 and also connected to thearithmetic circuit 14. Further, a cathode terminal of compressing diode24 is connected to the collector terminal of the transistor 22 and acathode terminal of compressing diode 25 is connected to a positiveinput terminal of the operational amplifier 23. A power supply 26 isconnected to an anode terminal of each of these compressing diodes 24and 25. The power supply 26 is a constant voltage source for supplying adc voltage V_(REF).

A capacitor 27 for removing the stationary light is externally attachedto a CHF terminal 35 of the AFIC 10, whereby this capacitor 27 forremoval of stationary light is connected to a base terminal oftransistor 28 for removal of stationary light in the first signalprocessing circuit 11. The capacitor 27 and the operational amplifier 23are connected to each other through a switch 29 and the CPU 1 controlson/off of this switch 29. A collector terminal of the transistor 28 forremoval of stationary light is connected to the negative input terminalof the operational amplifier 20 and an emitter terminal of thetransistor 28 is grounded through a resistor 30.

The integrating circuit 15 has the following configuration. Theintegrating capacitor 6 externally attached to the C_(INT) terminal 33of the AFIC 10 is connected through a switch 60 to an output terminal ofthe arithmetic circuit 14 and through a switch 62 to aconstant-current-source 63. The integrating capacitor 6 is alsoconnected through a switch 65 to an output terminal of an operationalamplifier 64 and connected directly to a negative input terminal of theoperational amplifier 64. Further, a potential of the integratingcapacitor 6 is outputted from the S_(OUT) terminal 34 of the AFIC 10.These switches 60, 62, and 65 are controlled by a control signal fromthe CPU 1. A second reference voltage supply 66 is connected to apositive input terminal of the operational amplifier 64. The referencevoltage supply 66 is a dc power supply which supplies the referencevoltage V_(REF2).

The schematic action of this AFIC 10 will be described below referringto FIG. 1 and FIG. 2.

The CPU 1 keeps the switch 29 of the first signal processing circuit 11on while the IRED 4 emits no light. At this time the stationary lightcomponent I₀ outputted from the PSD 5 is put into the first signalprocessing circuit 11, and the current thereof is amplified by thecurrent amplifier composed of the operational amplifier 20, thetransistor 21, and the transistor 22. The amplified current islogarithmically compressed by the compressing diode 24 to be convertedinto a voltage signal, and this voltage signal is put into the negativeinput terminal of the operational amplifier 23. If a large signal entersthe operational amplifier 20, the cathode potential of the compressingdiode 24 becomes high and thus the operational amplifier 23 outputs alarge signal to charge the capacitor 27 for removal of stationary light.Then base current is supplied to the transistor 28, and thus collectorcurrent flows in the transistor 28, so as to lower the signal suppliedto the operational amplifier 20 among the signal I₀ inputted into thefirst signal processing circuit 11. In a stable state of the operationof this closed loop, all the signal I₀ inputted into the first signalprocessing circuit 11 flows to the transistor 28 and the capacitor 27for removal of stationary light stores charge corresponding to the basecurrent at that time.

When the CPU 1 turns the switch 29 off with emission of the IRED 4, thestationary light component I₀ out of the signal I₁+I₀ outputted from thePSD 5 at this time flows as collector current to the transistor 28 towhich the base potential is applied by the charge stored in thecapacitor 27 for removal of stationary light. The near-side signal I₁ iscurrent-amplified by the current amplifier comprised of the operationalamplifier 20 and the transistors 21 and 22 and is logarithmicallycompressed by the compressing diode 24 into a voltage signal to beoutputted. Namely, the first signal processing circuit 11 outputs onlythe near-side signal I₁ after the removal of the stationary lightcomponent I₀ and the near-side signal I₁ is supplied to the arithmeticcircuit 14. On the other hand, the second signal processing circuit 12also outputs only the far-side signal I₂ after removal of the stationarylight component I₀, as the first signal processing circuit 11 did, andthe far-side signal I₂ is supplied to the arithmetic circuit 14.

The near-side signal I₁ outputted from the first signal processingcircuit 11 and the far-side signal I₂ outputted from the second signalprocessing circuit 12 are put into the arithmetic circuit 14, and thearithmetic circuit 14 computes and outputs the output ratio(I₁/(I₁+I₂)). The output ratio is put into the integrating circuit 15.While the IRED 4 emits the predetermined number of pulses, the switch 60of the integrating circuit 15 is kept on and the switches 62 and 65 off;therefore, the output ratio signal outputted from the arithmetic circuit14 is stored in the integrating capacitor 6. After the end of theemission of the predetermined number of pulses, the switch 60 is turnedoff and the switch 65 is turned on. Thus the charge stored in theintegrating capacitor 6 decreases because of charge of an oppositepotential supplied from the output terminal of the operational amplifier64.

The CPU 1 monitors the potential of the integrating capacitor 6 tomeasure the time necessary for a return-to the original potential,obtains the AF signal based on the time, and further computes thedistance to the measured object.

Next, the capacitance of the integrating capacitor 6 will be describedin detail.

The capacitance of the integrating capacitor 6 is set so that theintegrating capacitor 6 is discharged to the maximum under the conditionin which the time necessary for the first integral described hereinafterbecomes minimum when the output ratio signal outputted from thearithmetic circuit 14 is maximum. For example, the following relation ofEq (1) holds, where the capacitance of the integrating capacitor 6 is.C, the voltage that can be utilized during the discharge of theintegrating capacitor 6 is V_(MAX), a discharge current value at themaximum output-ratio in the first integral is I, and the time necessaryfor the discharge in the first integral is T.

C·V _(MAX) =I·T  (1)

Let us suppose here that the voltage V_(MAX) that can be utilized forthe discharge is 0.97 V, the discharge current value at the maximumoutput ratio is 7.8 μA, and the discharge time T is 2600 μs. Then thecapacitance C of the integrating capacitor 6 is about 0.021 μF.Therefore, a capacitor having the capacitance of 0.022 μF may beemployed as the integrating capacitor 6.

This setting of the capacitance of the integrating capacitor 6 permitsthe dischargeable dynamic range of the integrating capacitor 6 to beutilized to the maximum even if the time necessary for the firstintegral during the distance measurement is minimum. Therefore, thedistance measurement accuracy can be improved.

The discharge time T is a discharge time when the time necessary for thefirst integral is minimum. For example, the discharge time is determinedby a discharge time for emission of each pulse and the number of pulsesemitted for output of one distance measurement result. When thedischarge time for emission of each pulse is 26 μs and the number ofpulses emitted for output of one distance measurement result is 100, thedischarge time T is computed as follows; 26 μs×100=2600 μs.

The voltage V_(MAX) that can be utilized for the discharge is determinedas follows, for example. As illustrated in FIG. 3, where a differentialcircuit including two transistors 71, 72 and a constant-current source73 is used as the arithmetic circuit 14, the integrating capacitor 6 isfirst charged by the reference voltage V_(REF2) of the second referencevoltage supply 66 prior to the first integral. Then the compressingdiode 24, receiving the supply of the reference voltage V_(REF) from thepower supply 26, logarithmically compresses the near-side signal I₁ byaction of the transistor 22 to output the result from the first signalprocessing circuit 11. The transistor 71 is activated based on thenear-side signal I₁ etc., and the action thereof starts discharging theintegrating capacitor 6. In this case, the voltage (dynamic range)V_(MAX) that can be utilized in the integrating capacitor 6 can beexpressed by Eq (2) below.

V _(MAX) =V _(REF)−(V _(REF2) −V _(D) −V _(QBE) +V _(QCE))  (2)

In the above equation, V_(D) is the forward voltage of the compressingdiode 24, V_(QBE) the voltage between the base and the emitter of thetransistor 71, and V_(QCE) the voltage between the collector and theemitter of the transistor 71. For example, let V_(REF) be 1.5 V,V_(REF2) be 1.63 V, V_(D) be 0.6 V, V_(QBE) be 0.6 V, and V_(QCE) be 0.1V; then V_(MAX) is 0.97 V from Eq (2).

Next, the operation of the distance-measuring apparatus of the presentembodiment will be described.

First described is the operation of the distance-measuring apparatuscarried out when the time necessary for the first integral during thedistance measurement is set to the minimum (for example, when the numberof pulses emitted from the IRED is 100). FIG. 4A to FIG. 4C are timingcharts; FIG. 4A shows the charging voltage of the integrating capacitor6, FIG. 4B the operation of the switch 65, and FIG. 4C the operation ofthe switch 62.

When the shutter release button of the camera is depressed by a halfstroke to enter the distance-measuring state, the supply of thepower-supply voltage is restarted to the AFIC 10 to turn the switch 65on, whereupon the reference voltage V_(REF2) is applied to theintegrating capacitor 6 to charge it. This charge promotes thedielectric polarization of the integrating capacitor 6. After a lapse ofa fixed time since the start of the charge of the integrating capacitor6, the switch 65 is turned off to terminate the charge. Then the driver3 is actuated by a signal from the CPU 1 to make the IRED 4 emit pulsesof infrared light.

The infrared light emitted from the IRED 4 is reflected by the measuredobject and thereafter received by the PSD 5. On the other hand, at thesame time as the emission of the IRED 4, the switch 29 of the firstsignal processing circuit 11 is turned off to put the near-side signalI₁ after the removal of the stationary light component I₀ into thearithmetic circuit 14. Similarly, the far-side signal I₂ after theremoval of the stationary light component I₀ is supplied from the secondsignal processing circuit 12 into the arithmetic circuit 14.

The arithmetic circuit 14 outputs the data of output ratio I₁/(I₁+I₂)based on the near-side signal I₁ and far-side signal I₂. As soon as thisoutput becomes stable, the switch 60 of the integrating circuit 15 isturned on to put the negative voltage corresponding to the output ratiooutputted from the arithmetic circuit 14, into the integrating capacitor6.

The switch 60 of the integrating circuit 15 is turned off at the sametime as off of the IRED 4. After a lapse of a signal error time, theswitch 29 of the first signal processing circuit 11 is turned on tostart storage of the stationary light component I₀ of the output signaloutputted from the PSD 5, in the capacitor 27 for removal of stationarylight.

The integrating capacitor 6 of the integrating circuit 15 accepts theoutput ratio or distance information signal outputted from thearithmetic circuit 14 to discharge by a voltage value according to avalue of the distance information signal. Namely, as illustrated in FIG.4A, the distance information signal enters the integrating capacitor 6every emission of a pulse from the IRED 4 to decrease the voltage of theintegrating capacitor 6 stepwise (first integral). A voltage drop amountof each step itself is distance information corresponding to thedistance to the measured object, but in the present embodiment thedistance information is obtained as the sum of voltage drop amountsobtained by emission of respective pulses from the IRED 4.

After completion of the input by the predetermined number of emissionsto the integrating capacitor 6, the switch 60 is kept off and the switch62 is turned on by a signal from the CPU 1. This causes the integratingcapacitor 6 to charge at a constant rate determined by the rating of theconstant-current source 63 (second integral).

During the period of this second integral the voltage of the integratingcapacitor 6 is compared with the reference.voltage V_(REF2) and thecharging of the integrating capacitor 6 is terminated by turning theswitch 62 off with agreement between them. The CPU 1 measures the timenecessitated for the second integral. Since the charging rate by theconstant-current source 63 is constant, the distance to the measuredobject can be computed from the time required for the second integral.

Next described is the operation of the distance-measuring apparatuscarried out when the time necessary for the first integral during thedistance measurement is set longer than the minimum time because ofobject conditions such as the reflectance or the like (for example, whenthe number of pulses emitted from the IRED is 200). FIG. 5A to FIG. 5Care timing charts; FIG. 5A shows the charging voltage of the integratingcapacitor 6, FIG. 5B the operation of the switch 65, and FIG. 5C theoperation of the switch 62.

When the shutter release button of the camera is depressed by a halfstroke to enter the distance-measuring state, the supply of thepower-supply voltage is restarted to the AFIC 10 in the same manner asdescribed above to turn the switch 65 on, whereupon the referencevoltage V_(REF2) is applied to the integrating capacitor 6 to charge it.Then the switch 65 is turned off to terminate the charge. The driver 3is actuated by a signal from the CPU 1 to make the IRED 4 emit pulses ofinfrared light. The infrared light emitted from the IRED 4 is reflectedby the measured object and thereafter received by the PSD 5. On theother hand, at the same time as the emission of the IRED 4, the switch29 of the first signal processing circuit 11 is turned off to put thenear-side signal I₁ after the removal of the stationary light componentI₀ into the arithmetic circuit 14. Similarly, the far-side signal I₂after the removal of the stationary light component I₀ is supplied fromthe second signal processing circuit 12 into the arithmetic circuit 14.

The arithmetic circuit 14 outputs the data of output ratio I₁/(I₁+I₂)based on the near-side signal I₁ and far-side signal I₂. As soon as thisoutput becomes stable, the switch 60 of the integrating circuit 15 isturned on to put the negative voltage corresponding to the output ratiooutputted from the arithmetic circuit 14, into the integrating capacitor6.

The switch 60 of the integrating circuit 15 is turned off at the sametime as off of the IRED 4. After a lapse of the signal error time, theswitch 29 of the first signal processing circuit 11 is turned on tostart storage of the stationary light component I₀ of the output signaloutputted from the PSD 5, in the capacitor 27 for removal of stationarylight.

The integrating capacitor 6 of the integrating circuit 15 accepts theoutput ratio or distance information signal outputted from thearithmetic circuit 14 to discharge by a voltage value according to avalue of the distance information signal. Namely, as illustrated in FIG.5A, the distance information signal enters the integrating capacitor 6every emission of a pulse from the IRED 4 to decrease the voltage of theintegrating capacitor 6 stepwise (first integral). A voltage drop amountof each step itself is distance information corresponding to thedistance to the measured object, but in the present embodiment thedistance information is obtained as the sum of voltage drop amountsobtained by emission of respective pulses from the IRED 4.

After completion of the input by the predetermined number of emissions(for example, 100 pulses) to the integrating capacitor 6, the switch 60is turned off and the switch 62 is turned on by a signal from the CPU 1.This causes the integrating capacitor 6 to charge at the constant ratedetermined by the rating of the constant-current source 63 (secondintegral).

During the period of this second integral the voltage of the integratingcapacitor 6 is compared with the reference voltage V_(REF2) and thecharging of the integrating capacitor 6 is terminated by turning theswitch 62 off with agreement between them.

After that, the driver 3 is actuated again by a signal from the CPU 1 tomake the IRED 4 emit pulses, and the reflected light from the measuredobject is received by the PSD 5. On the other hand, at the same time asthe emission of the IRED 4, the switch 29 of the first signal processingcircuit 11 is turned off, whereupon the near-side signal I₁ after theremoval of the stationary light component I₀ is put into the arithmeticcircuit 14. Similarly, the far-side signal I₂ after the removable of thestationary light component I₀ is also supplied from the second signalprocessing circuit 12 to the arithmetic circuit 14.

The arithmetic circuit 14 outputs the data of output ratio I₁/(I₁+I₂)based on these near-side signal I₁ and far-side signal I₂. As soon asthis output becomes stable, the switch 60 of the integrating circuit 15is turned on, whereupon a negative voltage corresponding to the outputratio outputted from the arithmetic circuit 14 is put into theintegrating capacitor 6.

Then the switch 60 of the integrating circuit 15 is turned off at thesame time as off of the IRED 4. The switch 29 of the first signalprocessing circuit 11 is turned on after a lapse of the signal errortime, whereby the capacitor 27 for removal of stationary light startsstorage of the stationary light component I₀ of the output signaloutputted from the PSD 5.

The integrating capacitor 6 of the integrating circuit 15 accepts theoutput ratio or distance information signal outputted from thearithmetic circuit 14 to discharge by a voltage value according to avalue of the distance information signal. Namely, the voltage of theintegrating capacitor 6 decreases stepwise with input of the distanceinformation signal every emission of a pulse from the IRED 4 (firstintegral), as illustrated in FIG. 5A.

After completion of input by the predetermined number of emissions tothe integrating capacitor 6, the switch 60 is turned off and the switch62 is turned on by a signal from the CPU 1. This causes the integratingcapacitor 6 to charge at the constant rate determined by the rating ofthe constant-current source 63 (second integral). During the period ofthis second integral the comparator 64 compares the voltage of theintegrating capacitor 6,with the reference voltage V_(REF2), and theswitch 62 is turned off to terminate the charge of the integratingcapacitor 6 with agreement between them.

The CPU 1 measures the time necessary for the second integral in thefirst measurement and in the second measurement and thereafter. Sincethe charging rate by the constant-current source 63 is constant, thedistance to the measured object can be computed from the total time forall the second integrals and the number of first integrals.

When the shutter release button is depressed thereafter by a fullstroke, the CPU 1 controls the lens driving circuit 7, based on thedistance thus obtained, to move the taking lens 8 to an appropriatein-focus position and then opens the shutter (not illustrated) to effectexposure. With the shutter release operation, the series ofphotographing operations, including the precharge, distance measurement(first integral and second integral), focusing, and exposure, arecarried out in the above-stated manner.

As described above, since the capacitance of the integrating capacitor 6is set so as to be discharged to the maximum when the time necessary forthe first integral is minimum, the distance-measuring apparatus 100 ofthe present embodiment can maximize the utilization of the dischargeabledynamic range of the integrating capacitor 6 even if the time necessaryfor the first integral during the distance measurement is minimum.Therefore, the distance measurement can be carried out with goodaccuracy.

When the time necessary for the first integral is longer than theminimum time, the first integral and second integral are carried outrepeatedly, whereby the distance to the measured object can be measuredwith accuracy.

It is noted that the present invention is by no means limited to theabove embodiment but can involve various modifications and changes. Forexample, the present invention can also be applied to cases in which thecharge and discharge of the integrating circuit are reverse to those inthe above embodiment, as illustrated in FIG. 5D, i.e., to theintegrating circuits in which the integrating capacitor is charged inplural steps so as to increase the voltage stepwise in the firstintegral and thereafter the integrating capacitor is discharged in asingle step in the second integral.

Second Embodiment

The distance-measuring apparatus of the second embodiment will bedescribed below.

The distance-measuring apparatus of the present embodiment has almostsimilar structure and performs almost similar operation to thedistance-measuring apparatus of the first embodiment illustrated in FIG.1 and FIG. 2, but the present embodiment is different from the firstembodiment in that discharge current values in the first integral arechanged over according to the distance measurement conditions asoccasion may demand.

FIG. 6 shows the arithmetic circuit of the distance-measuring apparatusof the present embodiment. As illustrated in FIG. 6, the arithmeticcircuit 14 in the distance-measuring apparatus of the present embodimenthas the transistor 71 and the transistor 72 whose emitter terminals areconnected to each other. Connected to each emitter terminal thereof area plurality of constant-current sources 73 (73 a, 73 b, 73 c) ofdifferent current values. Each constant-current source 73 is groundedvia a switch 74 (74 a, 74 b, or 74 c).

In this arithmetic circuit 14, either one of the switches 74 a, 74 b, 74c is turned on by a signal from the CPU 1 and in response to the onstate either one of the constant-current sources 73 a, 73 b, 73 c isthus used for supplying the discharge current of the integratingcapacitor 6 in the first integral.

Let Ia be the current of the constant-current source 73 a, Ib be thecurrent of the constant-current source 73 b, and Ic be the current ofthe constant-current source 73 c. Then these currents Ia, Ib, Ic aredetermined as follows. Let us suppose that the capacitance of theintegrating capacitor 6 is 0.068 μF, the voltage (dynamic range) V_(MAX)that can be utilized in the integrating capacitor 6 is 0.9 V, and thefirst integral time is changed over among 7800 μs, 3900 μs, and 2600 μs,depending upon the distance measurement conditions and the like. Whenthe first integral time is 7800 μs, the discharge current value is 7.8μA from Eq (1) stated above. When the first integral time is 3900 μs,the discharge current value is 15.6 μA from above Eq (1). Further, whenthe first integral time is 2600 μs, the discharge current value is 23.4μA from above Eq (1).

Therefore, when the apparatus is constructed so that the current Ia ofthe constant-current source 73 a is 7.8 μA, the current Ib of theconstant-current source 73 b is 15.6 μA, the current Ic of theconstant-current source 73 c is 23.4 μA, and either one of theconstant-current sources 73 a, 73 b, 73 c is properly selected withchange of the first integral time depending upon the distancemeasurement conditions and the like, the apparatus can perform thedistance measurement while maximizing the utilization of thedischargeable dynamic range of the integrating capacitor 6. Therefore,the distance measurement can be carried out with good accuracy.

Although the present embodiment was described in the form using thethree constant-current-sources 73, it should be noted that thedistance-measuring apparatus according to the present invention is notlimited to this form but may be constructed in various forms using twoor four or more constant-current sources 73.

Third Embodiment

The distance-measuring apparatus of the third embodiment will bedescribed below.

The distance-measuring apparatus of the present embodiment has almostsimilar structure and performs almost similar operation to thedistance-measuring apparatus of the first embodiment illustrated in FIG.1 and FIG. 2, but the present embodiment is different from the firstembodiment in that either one of integrating capacitors of differentcapacitances is properly selected in the first integral and the secondintegral, depending upon the distance measurement conditions, asoccasion may demand.

FIG. 7 is an explanatory diagram to show the integrating capacitors inthe distance-measuring apparatus of the present embodiment. Asillustrated in FIG. 7, the distance-measuring apparatus of the presentembodiment has a plurality of integrating capacitors 6 (6 a, 6 b, 6 c)of different capacitances. Each integrating capacitor 6 is connected viaa switch 75 (75 a, 75 b, or 75 c) to the integrating circuit 15.

When either one of the switches 75 a, 75 b, 75 c is turned on by asignal from the CPU 1, either one of these integrating capacitors 6 a, 6b, 6 c is selectively connected to the integrating circuit 15 inresponse to the on state to be used in the first integral and the secondintegral.

Let Ca be the capacitance of the integrating capacitor 6 a, Cb be thecapacitance of the integrating capacitor 6 b, and Cc be the capacitanceof the integrating capacitor 6 c. Then these capacitances Ca, Cb, Cc aredetermined as follows. Suppose that the discharge current in the firstintegral is 7.8 μA, the voltage (dynamic range) V_(MAX) that can beutilized in the integrating capacitor 6 is 0.93 V, and the firstintegral time is changed over among 7800 μs, 3900 μs, and 2600 μs,depending upon the distance measurement conditions and the like. Whenthe first integral time is 7800 μs, the capacitance of the integratingcapacitor is about 0.068 μF from Eq (1) described above in order tocarry out the distance measurement while maximizing the utilization ofthe dynamic range of the integrating capacitor 6. When the firstintegral time is 3900 μs, the capacitance of the integrating capacitoris about 0.033 μF from above Eq (1) in order to carry out the distancemeasurement while maximizing the utilization of the dynamic range of theintegrating capacitor 6. Further, when the first integral time is 2600μs, the capacitance of the integrating capacitor is about 0.022 μF fromabove Eq (1) in order to carry out the distance measurement whilemaximizing the utilization of the dynamic range of the integratingcapacitor 6.

When the apparatus is arranged so that the capacitance Ca of theintegrating capacitor 6 a is. 0.068 μF, the capacitance Cb of theintegrating capacitor 6 b is 0.033 μF, the capacitance Cc of theintegrating capacitor 6 c is 0.022 μF, and either one of the integratingcapacitors 6 a, 6 b, 6 c is properly selected with change of the firstintegral time depending upon the distance measurement conditions and thelike, the apparatus can perform the distance measurement whilemaximizing the utilization of the dischargeable dynamic range of eachintegrating capacitor 6 accordingly. Therefore, the distance measurementcan be carried out with good accuracy.

The present embodiment was described in the form using the threeintegrating capacitors 6, but the distance-measuring apparatus accordingto the present invention is not limited to this form. Thedistance-measuring apparatus of the present invention may also beconstructed in various forms using two or four or more integratingcapacitors 6.

As described above, the present invention permits the maximumutilization of the dischargeable or chargeable dynamic range of theintegrating capacitor on the occasion of execution of the firstintegral. The distance measurement accuracy can be improved accordingly.

From the invention thus described, it will be obvious that the inventionmay be varied in many ways. Such variations are not to be regarded as adeparture from the spirit and scope of the invention, and all suchmodifications as would be obvious to one skilled in the art are intendedfor inclusion within the scope of the following claims.

What is claimed is:
 1. A distance-measuring apparatus comprising: lightprojecting means for projecting pulses of light toward an object at adistanced to be measured; light detecting means for detecting light ofsaid light projected toward and reflected from the object, at aphotoreceptive position on a position sensing device according to thedistance to the object and outputting a signal according to thephotoreceptive position; arithmetic means for carrying out an arithmeticoperation based on the signal outputted from said light detecting meansand outputting an output ratio signal according to the distance to theobject; integrating means comprising an integrating capacitor, saidintegrating means carrying out a first integration in which the signaloutputted from said arithmetic means is integrated bydischarging/charging said integrating capacitor according to the signaloutput from said arithmetic means and, thereafter, carrying out a secondintegration by charging/discharging said integrating capacitor with aconstant current, said integrating means comparing a voltage of saidintegrating capacitor with a reference voltage during the secondintegration and outputting a comparison result signal according to aresult of the comparison; and detecting means for detecting the distanceto the object, based on the signal output from said integrating means,wherein said integrating means comprises a plurality current sourceshaving different output currents and said integrating means carries outthe first integration with one of said current sources todischarge/charge the integrating capacitor to a maximum in detection ofthe distance to the object.
 2. The distance-measuring apparatusaccording to claim 1, for focusing a lens.
 3. The distance-measuringapparatus according to claim 1, wherein said light projecting means isan infrared-emitting diode.
 4. The distance-measuring apparatusaccording to claim 1, wherein said light detecting means outputs anear-side signal which increases with decreasing distance to the objectand a far-side signal which increases with increasing distance to theobject.
 5. The distance-measuring apparatus according to claim 1,wherein said arithmetic means outputs the output ratio signal based on aratio of the near-side signal and the far-side signal.
 6. Thedistance-measuring apparatus according to claim 1, wherein thearithmetic means and the integrated means are integrated in a singleautofocusing integrated circuit.